<?php

namespace app\model\zs;

use think\Model;

class ZsCouponCate extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'coupon_cates';

    // 设置当前模型的数据库连接
    protected $connection = 'zs';

    const STATUS_ON = 1;
    const STATUS_OFF = 2;

    /**
     * 状态对应文本
     */
    public static function statusRels()
    {
        return [
            static::STATUS_ON => '启用',
            static::STATUS_OFF => '禁用',
        ];
    }

    /**
     * 状态对应css class名称
     */
    public static function statusClassRels()
    {
        return [
            static::STATUS_ON => '',
            static::STATUS_OFF => 'color-red',
        ];
    }
}
